﻿using FluentNHibernate.Mapping;
using YunBox2.Contracts.FoundationModels;

namespace YunBox2.DAL.Maps
{
	public class BoardTypeMap : ClassMap<BoardType>
	{
		public BoardTypeMap()
		{
			Id(x => x.Id).GeneratedBy.Guid().Default("(newid())");
			Map(x => x.Name).Length(32).Not.Nullable();
		    Map(x => x.Thickness);
		    Map(x => x.NailWidth);
		    Map(x => x.PlusWidth);
			Map(x => x.LastModifiedTime);
			References(x => x.LastModifiedUser).Column("LastModifiedUserID");
            Table("BoardType");
         
		}
	}

    public class BoardTypeSummaryMap : ClassMap<BoardTypeSummary>
    {
        public BoardTypeSummaryMap()
        {
            Id(x => x.Id);
            Map(x => x.Name).Length(32).Not.Nullable();
            Table("BoardType");
            ReadOnly();
        }
    }
}